<?php
$this->title = "User Home Page";
$this->headTitle($this->title);
?>

  <div id="content">
    <div id="inner">
      <div id="message">
      <div class="left float-l">
        <h2><?php echo $this->categoryname; ?></h2>
        <div class="float-l">
        <br><br></div>
        <table class="protable">
        <tr><th height="3"><b>Products</b></th><th></th></tr>
            <?php $i=0; ?>
            <?php foreach ($this->allproducts as $pro): ?>
            <?php if($i%2==0): ?>
            <?php echo '<tr>';?>
            <?php endif; ?>
            <td>
               <img src="<?php echo "/prodimages/".$pro['image'] ?>" alt="<?php echo $pro['product_name']; ?>" >
            </td>
            <td>
               <b>Name: </b><?php echo $pro['product_name']?><br />
               <b>Price: </b><?php echo $pro['price']?><br />
               <b>Available Quantity:</b><?php echo $pro['quantity']?><br />
               <a href="javascript:void(0);" id="<?php echo $pro['product_id'] ?>"  class="add">Add to Cart</a>
            </td>
            <?php if($i%2==0): ?>
            <?php echo '</tr>'; ?>
            <?php endif; ?>
            <?php $i++; ?>
            <?php endforeach;?>
        </table>
        </div>
      </div>
      <div class="right folat-r">
        <div id="side">
          <div id="top">
            <h2>Categories</h2>
            <ul class="meun">
              <li><a href="" id="1" class="cat">Mobiles</a></li>
              <li><a href="" id="2" class="cat">LabTops </a></li>
              <li><a href=""id="3" class="cat">LCD </a></li>
            </ul>
          </div>
          <div id="bm">
            <h2>My Account</h2>
            <ul class="meun">
              <li><a href="/user/show">Show Profile</a></li>
              <li><a href="/user/edit">Edit Profile</a></li>
              <li><a href="/user/userpage">Products</a></li>
              <li><a href="/user/displaycart">My Shop Cart </a></li>
            </ul>
             
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- /content -->
